package mobilesearch.receiver;

import java.util.ArrayList;
import mobilesearch.data.SmsData;
import mobilesearch.ui.OnSearchResultListener;

public class SmsReceiver {
	
	private static final String TAG = "SmsReceiver";
	private ArrayList<SmsData> smsList;
	private OnSearchResultListener listener;
	
	public SmsReceiver(ArrayList<SmsData> smsList, OnSearchResultListener listener) {
		this.smsList = smsList;
		this.listener = listener;
	}
	
	public void processSmsData(){
		int size = this.smsList.size();
		for(int i = 0; i < size; i++){
			SmsData data = this.smsList.get(i);
			String smsPerson = data.getSmsPerson();
			String smsBody = data.getSmsBody();
			this.listener.onReceiveSmsData(smsPerson, smsBody);
		}
	}

}
